package com.chanyachting.emall.action.companyproduct;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;

import com.chanyachting.emall.domain.Rentyacht;
import com.chanyachting.emall.form.RentyachtForm;
import com.chanyachting.emall.service.RentyachtService;
import com.chanyachting.emall.serviceImpl.RentyachtServiceImpl;

public class EditRentyachtAction extends Action {

	@Override
	public ActionForward execute(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response)
			throws Exception {
		
		
		RentyachtForm syform=(RentyachtForm)form;
		
		Rentyacht sy= null;
		try {
			
			RentyachtService cpservice=new RentyachtServiceImpl();
			
			sy = cpservice.QueryOneRentyacht(syform.getId().toString());
			
		} catch (Exception e) {
			
			e.printStackTrace();
		}
		syform.setRentyacht(sy);
		return mapping.findForward("editRentyacht");
		
	}
	
	

}
